Track Header Atoms
The track header atom specifies the characteristics of a single track within a movie. A track header atom contains a Size field that specifies the number of bytes and a Type field that indicates the format of the data (defined by the atom type,
'tkhd'
).
Figure 0-10
shows the structure of a track header atom.
Figure 10
The layout of a track header atom
The track header atom contains the track characteristics for the track, including temporal, spatial, and volume information.
Track header atoms contain the following data elements.
-
Size
-
A 32-bit integer that specifies the number of bytes in this track header atom.
-
Type
-
A 32-bit integer that identifies the atom type; this field must be set to
'tkhd'
.
-
Version
-
A 1-byte specification of the version of this track header.
-
Track header flags
-
Three bytes that are reserved for the track header flags. These flags indicate how the track is used in the movie. The following flags are valid (all flags are enabled when set to 1).
-
Track enabled
-
Indicates that the track is enabled. Flag value is 0x0001.
-
Track in movie
-
Indicates that the track is used in the movie. Flag value is 0x0002.
-
Track in preview
-
Indicates that the track is used in the movie's preview. Flag value is 0x0004.
-
Track in poster
-
Indicates that the track is used in the movie's poster. Flag value is 0x0008.
-
Creation time
-
A 32-bit integer that indicates (in seconds since midnight, January 1, 1904) when the track header was created.
-
Modification time
-
A 32-bit integer that indicates (in seconds since midnight, January 1, 1904) when the track header was changed.
-
Track ID
-
A 32-bit integer that uniquely identifies the track. A value of 0 must never be used for a track ID.
-
Reserved
-
A 32-bit integer that is reserved for use by Apple. Set this field to 0.
-
Duration
-
A time value that indicates the duration of this track (in the movie's time coordinate system). Note that this property is derived from the track's edits. The value of this field is equal to the sum of the durations of all of the track's edits.
-
Reserved
-
An 8-byte value that is reserved for use by Apple. Set this field to 0.
-
Layer
-
A 16-bit integer that indicates this track's spatial priority in its movie. The QuickTime Movie Toolbox uses this value to determine how tracks overlay one another. Tracks with lower layer values are displayed in front of tracks with higher layer values.
-
Alternate group
-
A 16-bit integer that specifies a collection of movie tracks that contain alternate data for one another. QuickTime chooses one track from the group to be used when the movie is played. The choice may be based on such considerations as playback quality or language and the capabilities of the computer.
-
Volume
-
A 16-bit fixed-point value that indicates how loudly this track's sound is to be played. A value of 1.0 indicates normal volume.
-
Reserved
-
A 16-bit integer that is reserved for use by Apple. Set this field to 0.
-
Matrix
-
The matrix structure associated with this track. See
Figure 0-44
on
[link]
for an illustration of a matrix structure.
-
Track width
-
A 32-bit fixed-point number that specifies the width of this track in pixels.
-
Track height
-
A 32-bit fixed-point number that indicates the height of this track in pixels.
© 1997 Apple Computer, Inc.| Previous | Chapter contents | Chapter top | Next |